package sheduler;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Timer;

public class Manager {
	Timer timer;
	private List<EmailTask> tasks;
	
	public Manager() {
		timer = new Timer();
		tasks = new ArrayList<EmailTask>();
	}	
	
	public void addTask(EmailTask task) {
		timer.schedule(task, task.getDelay() * 1000);
		tasks.add(task);
	}	
	
	public List<EmailTask> getTasks() {
		return tasks;
	}

}
